TCP/IP message driver

Communicating with a device via the TCP message driver uses the TCP/IP protocol and Windows sockets. The integrator end point may be set as a server (listening socket) or a client (connecting socket).

 

The recognised configuration properties are listed below:

 
NameTypeDefault ValueDescription
ServerBooleanN/AFlag to indicate whether this is a server or client
IPAddressIP address/host nameN/AServer IP address or name. It can also be used for TCP server to specify the local IP address the device will listen to This is the case for PC with multiple network adapter with multiple IP addresses.
Portport numberN/AIndicates the port to listen on, or connect to
ReconnectTimeUnsigned Integer5Time between client reconnection attempts (seconds). Valid for client only
NetworkByteOrderBooleanFalseIdentifies the endian order of the message header numeric values. The device IO contents are treated as single bytes therefore not swapped.
StripHeaderBooleanN/AWhen messages are sent and received the Sym3 Header is not sent as part of the message on the network. This allows devices that do not use the Sym3 Header to communicate with Sym3
AutoconnectBooleanTrue(optional true if not specified). If false, Sym3 won't connect to this device until an explicit call to ConnectDevice() is made from the script.
LocalIPIP Address0.0.0.0Optional. For TCP client Only. To specify the local IP address the device will connect from. This is the case for PC with multiple network adapter with multiple IP addresses.
LocalPortport number0Optional. For TCP client Only. To specify the local port number the device will connect from.
ContinuouslySendingOutputBooleanFalseOptional. Output messages are sent only if an output data has been changed. If you want Sym3 to continuously send messages you can set the flag to 'True'. Warning: this may affect performance significantly. Sym3 does not recommend using this setting. The update rate used will be the UpdateRate set for output data. The only way to change this is to export DeviceIOs to CSV file and change the last column then re-import the CSV file. Default rate is set to 50ms.
 

Examples

Server Example

server = true
port = 16000
stripheader = true
msgid = 100
ipaddress = 192.168.25.56 // IP on which server listen to (Optional for PC with multiple IPs)				

Client Example

server = False
ipaddress = 192.168.25.56
port = 16000
localip = 192.168.25.55 // IP on which client will connect from (Optional for PC with multiple IPs)
localport = 10000 // Local port from which client will connect (Optional)
reconnecttime = 10
NetworkByteOrder = false
 

NOTE: Configuration data is not case sensitive and white space is ignored.

 

Example Sym3 project using this driver.

These simple examples include conveyors and PEs to demonstrate the setup and principles of operation.

Sym3-NJ1-TCP.s3i - Example project

PLC-NJ1-TCP.smc2 - Example PLC code